define(function(require, exports, module) {
	"require:nomunge,exports:nomunge,module:nomunge";
	
    var self = exports;
    var utils = require('mokit/utils');
    var service = require('./service');
    var Project = require("./Project");
	
	self.data = {
		carlist:[],
		catlist:[],
		prolist:[],
		shalist:[],
		userlist:[]
	};

    //获取列表
    self.getList = function(callback){
        service.index.getList(function(rs, err) {
            if (err && callback) return callback(err.message || err);
            if (rs.success) {
               	self.data = rs.obj;
             	Project.mapCat(self.data.catlist);
                if (callback) callback();
            } else {
                rs = rs || {};
                var msg = rs.msg || 'unknow error';
                if (callback) callback(msg);
            }
        });    	
    };

});